function models(DataType, db) {
    let model = db.define('log', {
        id: {
            type: DataType.INTEGER,
            allowNull: false,
            autoIncrement: true,
            primaryKey: true
        },
        user_id: {
            type: DataType.INTEGER,
            comment: '管理员id',
            allowNull: false
        },
        event: {
            type: DataType.STRING,
            comment: '事件',
            allowNull: false
        }
    });
    // model.sync({force: true});
    model.belongsTo(db.User, { foreignKey: 'user_id' });
    return model;
}

exports.models = models;
